package org.wms.minbearwcs.entity.DTO.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.wms.minbearwcs.utils.ContentPool;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Resp {
    private String returnCode = RespPool.RETURN_WEB_CODE_SUCCESS;
    private String returnReason = "";

    public static Resp build(){
        return new Resp();
    }

    public Resp code(boolean code){
        returnCode = code? RespPool.RETURN_WEB_CODE_SUCCESS:RespPool.RETURN_WEB_CODE_FAIL;
        return this;
    }

    public Resp reason(String res){
        returnReason = res;
        return this;
    }
}
